import request from '../utils/request.js'
export function getHome(){
	return request({
		url:'/index_category/data',
		method:'GET',
		data:{}
	})
}
export function getPage(id,page){
	return request({
		url:`/index_category/${id}/data/${page}`,
		method:'GET',
	})
}
export function getChoose({title,page,all,sale_count,min_price,price}){
	return request({
		url:`/goods/search`,
		method:'POST',
		data:{title,page,all,sale_count,min_price,price}
	})
}
export function getCate(){
	return request({
		url:`/category/app_category`,
		method:'GET',
		data:{}
	})
}
export function getLogin(username,password){
	return request({
		url:`/login`,
		method:'POST',
		data:{username,password}
	})
}
export function logOut(){
	return request({
		url:`/logout`,
		method:'POST',
		data:{}
	})
}
export function getDetail(id){
	return request({
		url:`/goods/${id}`,
		method:'GET',
	})
}
export function addCart(shop_id,skus_type,num){
	return request({
		url:`/cart`,
		method:'POST',
		data:{
			shop_id,skus_type,num
		}
	})
}

export function getCart(){
	return request({
		url:`/cart`,
		method:'GET',
		data:{
			
		}
	})
}
export function delCart(shop_ids){
	return request({
		url:`/cart/delete`,
		method:'POST',
		data:{
			shop_ids
		}
	})
}






